/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.javalearningproject.VEK_ME.XML;

import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import com.googlecode.javalearningproject.util.FileGetter;
import com.googlecode.javalearningproject.VEK_ME.XML.ParsedObjects.ParsedObject;

/**
 *
 * @author Administrator
 * inspiration fra: http://www.javaworld.com/jw-03-2000/jw-03-xmlsax.html?page=1
 * og: http://www.totheriver.com/learn/xml/xmltutorial.html#5.4
 */

public class XMLParserMain {
    /*
    
    
    public static ParsedObject parseXMLAndReturnParsedObject(String s)
    {
    
    XMLParser_MapParser parserHandler = new XMLParser_MapParser();
    XMLReader parser = null;
    try { parser = XMLReaderFactory.createXMLReader(); } 
    catch (SAXException e) { System.err.println(e.getMessage()); }
    
    parser.setContentHandler(parserHandler); // set the type of parser for this file
    try{ parser.parse(new InputSource(FileGetter.getFileAsFileInputStream(s))); }
    catch (Exception e) { System.err.println("error parsing file"); }
    
    return parserHandler.getParsedMap();
     
    }
     * */
}

